<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>圆环形进度条</title>
    <style>
        .progress-circle {
            position: relative;
            width: 100px;
            height: 100px;
        }
        .progress-circle svg {
            transform: rotate(-90deg);
        }
        .progress-circle circle {
            fill: none;
            stroke-width: 10;
        }
        .progress-circle .bg {
            stroke: #d3d3d3;
        }
        .progress-circle .progress {
            stroke: #4d5bf9;
            stroke-linecap: round;
            transition: stroke-dashoffset 0.5s;
        }
        .progress-circle .text {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #4d5bf9;
        }
        .progress-circle .text .percentage {
            font-size: 20px;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <div class="progress-circle">
        <svg width="100" height="100">
            <circle class="bg" cx="50" cy="50" r="45"></circle>
            <circle class="progress" cx="50" cy="50" r="45" stroke-dasharray="282.6" stroke-dashoffset="282.6"></circle>
        </svg>
        <div class="text">
            <div>目前人数</div>
            <div class="percentage" id="progressText">0%</div>
        </div>
    </div>

    <script>
        function setProgress(progress) {
            const circle = document.querySelector('.progress-circle .progress');
            const text = document.getElementById('progressText');
            const radius = circle.r.baseVal.value;
            const circumference = 2 * Math.PI * radius;
            const offset = circumference - (progress / 100) * circumference;
            
            circle.style.strokeDashoffset = offset;
            text.textContent = `${progress}%`;
        }

        // Example: Update progress to 75%
        setProgress(75);
    </script>
</body>
</html>